package com.jluzh10.learning.web.exception;

/**
 * @author yzg
 * @create 2019/5/22
 *
 * 自定义异常类（继承RuntimeException以保证事务可以回滚）：
 */
public class MyException extends RuntimeException {
    private static final long serialVersionUID = 2305653807231756702L;

    //异常信息
    private String message;

    //构造器
    MyException(String message) {
        super(message);
        this.message = message;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
